package org.mysfit.ctp4j.core.service;

import org.mysfit.ctp4j.api.vo.QuoteVO;
import org.mysfit.ctp4j.api.vo.ReqVO;
import org.mysfit.ctp4j.infra.entity.SkData;

import ctp.thosttraderapi.CThostFtdcInvestorPositionField;
import ctp.thosttraderapi.CThostFtdcOrderField;
import ctp.thosttraderapi.CThostFtdcTradeField;
import ctp.thosttraderapi.CThostFtdcTraderApi;

/**
 * <p>
 * trade 服务类
 * </p>
 *
 * @author long.gf
 * @since 2022-12-02
 */
public interface TradeService {

	void initTradeApi(CThostFtdcTraderApi traderApi);
	
	void doPolyOrder(SkData sk);
	
	void doCtpOrder(QuoteVO q);

	void doCtpCancleOrder(QuoteVO q);

	void onRtnOrder(CThostFtdcOrderField c);

	void onRtnTrade(CThostFtdcTradeField t);

	void onRtnBons(CThostFtdcInvestorPositionField t);

	void insertTradeReq(ReqVO t);

	void insertTradeKC(ReqVO t);

	void insertTradePC(ReqVO t);

	void initBons();

}
